#region Microsoft Public License
/*
 * (c) Copyright Chenjun Wu. http://utablesdk.codeplex.com
 * 
 * This source is subject to the Microsoft Public License (Ms-PL).
 * Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
 * All other rights reserved.
 */
#endregion

﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UTable.ObjectManager;
using System.Windows;
using UTable.Objects;
using System.Collections.ObjectModel;


namespace UTable.Input
{
    public interface IInputManager
    {
        void StartWork();

        /// <summary>
        /// Register the input provider which provides the input event with inputEventArgsType
        /// </summary>
        void RegisterInputProvider(Type inputEventArgsType, IInputProvider provider);

        /// <summary>
        /// 
        /// </summary>
        void UnregisterInputProvider(Type inputEventArgsType, IInputProvider provider);

        /// <summary>
        /// Register the input mapper which maps the input event with inputEventArgsType
        /// </summary>
        void RegisterInputMapper(Type inputEventArgsType, IInputMapper mapper);

        /// <summary>
        /// 
        /// </summary>
        void UnregisterInputMapper(Type inputEventArgsType, IInputMapper mapper);

        /// <summary>
        /// Add a hook to the input manager
        /// </summary>
        void AddHook(IHook hook);

        /// <summary>
        /// Remove the hook from the input manager
        /// </summary>
        void RemoveHook(IHook hook);

        /// <summary>
        /// Get all the input mappers which map the input event with inputEventArgsType
        /// </summary>
        Collection<IInputMapper> GetInputMappersByType(Type inputEventArgsType);

        /// <summary>
        /// 
        /// </summary>
        Collection<Type> GetRegisteredInputEventTypes();

        /// <summary>
        /// 
        /// </summary>
        IVisualTree VisualTree { get; set; }

        /// <summary>
        /// 
        /// </summary>
        event ManagedInputEventHandler InputDetected;
    }
}
